Skip to content

Conversation

GuillaumeGomez
Copy link
Member

@GuillaumeGomez GuillaumeGomez commented Mar 26, 2018

Fixes #47391.

r? @eddyb

@pietroalbini pietroalbini added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Mar 26, 2018
@eddyb
Copy link
Member

eddyb commented Mar 26, 2018

Can you remove the backtrace and rename the PR to talk about the actual change?
Which is to have a tcx around for decoding item_body_nested_bodies.

@GuillaumeGomez GuillaumeGomez changed the title Fix path attribute in rustdoc Add tcx in item_body_nested_bodies Mar 26, 2018
@GuillaumeGomez
Copy link
Member Author

Well, the final goal of this PR was the original title. But changed it anyway.

@shepmaster
Copy link
Member

Ping from triage, @eddyb ! Looks like there's new commits to review!

@eddyb
Copy link
Member

eddyb commented Apr 10, 2018

@bors r+

I took the liberty of moving the backtrace in the PR description to this comment:

So it fixes the initial bug but we now get a wonderful panic:

RUST_BACKTRACE=1 cargo +local doc
 Documenting zmq-sys v0.9.0 (file:///Users/imperio/rust/rust-zmq/zmq-sys)
thread 'rustc' panicked at 'slice index starts at 729355 but ends at 729354', libcore/slice/mod.rs:791:5
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
stack backtrace:
   0: std::sys::unix::backtrace::tracing::imp::unwind_backtrace
   1: std::sys_common::backtrace::print
   2: std::panicking::default_hook::{{closure}}
   3: std::panicking::default_hook
   4: std::panicking::rust_panic_with_hook
   5: std::panicking::begin_panic_fmt
   6: rust_begin_unwind
   7: core::panicking::panic_fmt
   8: core::slice::slice_index_order_fail
   9: <rustc_metadata::decoder::DecodeContext<'a, 'tcx> as serialize::serialize::SpecializedDecoder<rustc_metadata::schema::LazySeq<T>>>::specialized_decode
  10: <rustc_metadata::schema::CrateRoot as serialize::serialize::Decodable>::decode::{{closure}}
  11: rustc_metadata::decoder::<impl rustc_metadata::schema::Lazy<T>>::decode
  12: rustc_metadata::decoder::<impl rustc_metadata::cstore::MetadataBlob>::get_root
  13: rustc_metadata::locator::Context::extract_one
  14: rustc_metadata::locator::Context::maybe_load_library_crate
  15: rustc_metadata::creader::CrateLoader::load
  16: rustc_metadata::creader::CrateLoader::resolve_crate
  17: <alloc::vec::Vec<T> as alloc::vec::SpecExtend<T, I>>::from_iter
  18: rustc_metadata::creader::CrateLoader::resolve_crate
  19: <alloc::vec::Vec<T> as alloc::vec::SpecExtend<T, I>>::from_iter
  20: rustc_metadata::creader::CrateLoader::resolve_crate
  21: <rustc_metadata::creader::CrateLoader<'a> as rustc::middle::cstore::CrateLoader>::process_item
  22: rustc_resolve::build_reduced_graph::<impl rustc_resolve::Resolver<'a>>::build_reduced_graph_for_item
  23: <rustc_resolve::build_reduced_graph::BuildReducedGraphVisitor<'a, 'b> as syntax::visit::Visitor<'a>>::visit_item
  24: syntax::visit::walk_item
  25: <rustc_resolve::build_reduced_graph::BuildReducedGraphVisitor<'a, 'b> as syntax::visit::Visitor<'a>>::visit_item
  26: syntax::ext::expand::Expansion::visit_with
  27: rustc_resolve::macros::<impl syntax::ext::base::Resolver for rustc_resolve::Resolver<'a>>::visit_expansion
  28: syntax::ext::expand::MacroExpander::collect_invocations
  29: syntax::ext::expand::MacroExpander::expand
  30: syntax::ext::expand::MacroExpander::expand_crate
  31: rustc_driver::driver::phase_2_configure_and_expand_inner::{{closure}}
  32: rustc::util::common::time
  33: rustc_driver::driver::phase_2_configure_and_expand_inner
  34: rustdoc::core::run_core
  35: <scoped_tls::ScopedKey<T>>::set

error: internal compiler error: unexpected panic

note: the compiler unexpectedly panicked. this is a bug.

note: we would appreciate a bug report: https://github.com/rust-lang/rust/blob/master/CONTRIBUTING.md#bug-reports

note: rustc 1.26.0-dev running on x86_64-apple-darwin

error: Could not document `zmq-sys`.

Caused by:
  process didn't exit successfully: `rustdoc --crate-name zmq_sys src/lib.rs -o /Users/imperio/rust/rust-zmq/zmq-sys/target/doc -L dependency=/Users/imperio/rust/rust-zmq/zmq-sys/target/debug/deps --extern libc=/Users/imperio/rust/rust-zmq/zmq-sys/target/debug/deps/liblibc-a6494ad5c7a8efaa.rmeta` (exit code: 101)

@bors
Copy link
Collaborator

bors commented Apr 10, 2018

📌 Commit ebbe0c2 has been approved by eddyb

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Apr 10, 2018
@bors
Copy link
Collaborator

bors commented Apr 10, 2018

⌛ Testing commit ebbe0c2 with merge b2a7b94...

bors added a commit that referenced this pull request Apr 10, 2018
@bors
Copy link
Collaborator

bors commented Apr 10, 2018

☀️ Test successful - status-appveyor, status-travis
Approved by: eddyb
Pushing b2a7b94 to master...

@bors bors merged commit ebbe0c2 into rust-lang:master Apr 10, 2018
@GuillaumeGomez GuillaumeGomez deleted the fix-path-attribute branch April 10, 2018 17:44
@GuillaumeGomez
Copy link
Member Author

Yes, so it's not fully fixed. The issue is just "moved".

@QuietMisdreavus QuietMisdreavus added beta-nominated Nominated for backporting to the compiler in the beta channel. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Apr 20, 2018
@QuietMisdreavus
Copy link
Contributor

Nominating for backport. The issue mentioned in the PR description is present in beta and stable, and the fix is small enough that backporting shouldn't be a big issue.

@alexcrichton alexcrichton added the beta-accepted Accepted for backporting to the compiler in the beta channel. label Apr 20, 2018
@alexcrichton alexcrichton removed the beta-nominated Nominated for backporting to the compiler in the beta channel. label Apr 20, 2018
bors added a commit that referenced this pull request Apr 21, 2018
[beta] Processing merged backports

This is a backport of the following PRs:

* #49386
* #49465
* #49647
* #49692
* #49695
* #49714
* #49730
* #49830
* #49981
@GuillaumeGomez
Copy link
Member Author

It's not fixing the issue. It's just fixing a part of the issue. You still can't have rustdoc working with #[path = "..."].

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
beta-accepted Accepted for backporting to the compiler in the beta channel. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants